home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / demos / bits93.zip / MAIN.ASM < prev    next >
Assembly Source File  |  1993-10-09  |  2KB  |  109 lines

  1.  
  2.  
  3. setborder       macro red,green,blue
  4.  
  5.                 push dx
  6.                 push ax
  7.  
  8.                 mov dx,03c8h
  9.                 xor al,al
  10.                 out dx,al
  11.                 inc dx
  12.                 mov al,red
  13.                 out dx,al
  14.                 mov al,green
  15.                 out dx,al
  16.                 mov al,blue
  17.                 out dx,al
  18.  
  19.                 pop ax
  20.                 pop dx
  21.  
  22.                 endm
  23.  
  24.  
  25.                 .model small
  26.                 locals
  27.  
  28.                 .data
  29.  
  30.                 extrn addr:word
  31.  
  32. old_imask       db 0
  33.  
  34.                 .code
  35.  
  36. quit            db 0
  37. pause           db 0
  38.  
  39.                 extrn sine_scroll:near
  40.                 extrn sync:near
  41.                 extrn put_background:near
  42.                 extrn set_colours:near
  43.                 extrn do_bounce:near,do_fish:near,blank_fish:near
  44.                 extrn SetInts:near,ClearInts:near,GetRasterLine:near
  45.                 extrn set_keys:near,reset_keys:near
  46.  
  47.                 public quit,pause
  48.  
  49.                 .startup
  50.  
  51.                 mov ax,013h
  52.                 int 010h
  53.  
  54.                 call SetInts
  55.  
  56.                 in al,021h
  57.                 mov old_imask,al
  58.                 mov al,011111100b
  59.                 out 021h,al
  60.  
  61.                 call set_colours
  62.                 call put_background
  63.  
  64.                 call set_keys
  65.  
  66. next:
  67.  
  68.                 call do_bounce
  69. @@wait_line:
  70.                 call GetRasterLine
  71.  
  72.                 cmp ax,240
  73.                 jnz @@wait_line
  74.  
  75. ;                setborder 32 32 32
  76.  
  77.                 call blank_fish
  78.                 call sine_scroll
  79.  
  80.                 mov di,addr
  81.                 call do_fish
  82.  
  83. ;                setborder 0 0 0
  84.  
  85. @@pause:
  86.                 test cs:pause,-1
  87.                 jnz @@pause
  88.  
  89.                 test cs:quit,-1
  90.                 jz next
  91.  
  92. @@quit:
  93.                 call reset_keys
  94.                 call ClearInts
  95.  
  96.                 mov al,old_imask
  97.                 out 021h,al
  98.  
  99.                 mov ax,3
  100.                 int 010h
  101.  
  102.                 mov ax,04c00h
  103.                 int 021h
  104.  
  105.                 .stack
  106.  
  107.                 end
  108.  
  109.